import Cookies from 'js-cookie'

// cookies存储token的key
const TokenKey = 'vue_renzi_token'
// cookies存储时间的key
const TimeStampKey = 'vue_renzi_timestamp'

export function getToken () {
  return Cookies.get(TokenKey)
}

export function setToken (token) {
  return Cookies.set(TokenKey, token)
}

export function removeToken () {
  return Cookies.remove(TokenKey)
}

export function getTimeStamp () {
  return Cookies.get(TimeStampKey)
}

export function setTimeStamp () {
  return Cookies.set(TimeStampKey, Date.now())
}

export function removeTimeStamp () {
  return Cookies.remove(TimeStampKey)
}
